﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:Con10uumSample"
  xmlns:c="clr-namespace:Con10uum;assembly=Con10uum"
  xmlns:i="http://schemas.microsoft.com/expression/2009/interactivity"
  xmlns:ShaderEffectLibrary="clr-namespace:ShaderEffectLibrary;assembly=ShaderEffectLibrary"
	xmlns:s1="clr-namespace:Con10uumSample"
  x:Class="Con10uumSample.MainWindow"  
	x:Name="Window" HorizontalAlignment="Left" VerticalAlignment="Top" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None" WindowState="Maximized" Topmost="False">
  <Window.Resources>
    <DataTemplate x:Key="HeaderTemplate">
      <Border BorderBrush="#FF3E3E3E" Width="100" BorderThickness="1" CornerRadius="4" HorizontalAlignment="Left" Margin="10,5,0,5">
        <Border.Background>
          <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="White"/>
            <GradientStop Color="White" Offset="1"/>
            <GradientStop Color="#FFc7c7c7" Offset="0.5"/>
          </LinearGradientBrush>
        </Border.Background>
        <Grid>
          <Canvas VerticalAlignment="Bottom" HorizontalAlignment="Right">
            <TextBlock FontWeight="Bold" FontFamily="Arial" FontSize="96" Foreground="#B2131313" Text="{Binding}" Height="200" Width="536" VerticalAlignment="Bottom" Canvas.Top="136" TextAlignment="Right" RenderTransformOrigin="0,0" Canvas.Left="0" >
              <TextBlock.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform Angle="-90"/>
                  <TranslateTransform Y="475"/>
                </TransformGroup>
              </TextBlock.RenderTransform>
            </TextBlock>
          </Canvas>
          <Rectangle HorizontalAlignment="Right" Width="5" RadiusX="1" RadiusY="1" StrokeThickness="0">
            <Rectangle.Fill>
              <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5" MappingMode="RelativeToBoundingBox">
                <GradientStop Color="#FF3E3E3E" Offset="1"/>
                <GradientStop Color="White" Offset="0"/>
              </LinearGradientBrush>
            </Rectangle.Fill>
          </Rectangle>
          <TextBlock RenderTransformOrigin="0.5,0.5" Margin="10" Foreground="#B2131313" TextAlignment="Right" FontWeight="Bold" FontFamily="Arial" FontSize="65" HorizontalAlignment="Left" VerticalAlignment="Bottom" Text="{Binding}">
            <TextBlock.LayoutTransform>
              <TransformGroup>
                <ScaleTransform/>
                <SkewTransform/>
                <RotateTransform Angle="-90"/>
                <TranslateTransform/>
              </TransformGroup>
            </TextBlock.LayoutTransform>
          </TextBlock>
          <Button x:Name="CloseButton" Width="53"  Height="53" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,5,0,0">
            <Image Source="images/closebutton.png" Stretch="Uniform"  Width="33" Height="32" />
          </Button>
          
        </Grid>
      </Border>
    </DataTemplate>
    <DataTemplate x:Key="ContentTemplate">
      <Border BorderBrush="#FF3E3E3E" BorderThickness="1" CornerRadius="4" Margin="1,5" >
        <Border.Background>
          <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="#40ffffff"/>
            <GradientStop Color="#40ffffff" Offset="1"/>
            <GradientStop Color="#40c7c7c7" Offset="0.5"/>
          </LinearGradientBrush>
        </Border.Background>
        <Grid>
          <Rectangle HorizontalAlignment="Right" Width="5" RadiusX="1" RadiusY="1" StrokeThickness="0">
            <Rectangle.Fill>
              <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5" MappingMode="RelativeToBoundingBox">
                <GradientStop Color="#FF3E3E3E" Offset="1"/>
                <GradientStop Color="White" Offset="0"/>
              </LinearGradientBrush>
            </Rectangle.Fill>
          </Rectangle>
          <ContentPresenter Content="{Binding}"  ClipToBounds="True"></ContentPresenter>          
        </Grid>
      </Border>
    </DataTemplate>
  </Window.Resources>
  <Grid x:Name="LayoutRoot" >
    <Grid.Background>
      <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFA6A6A6" Offset="0"/>
        <GradientStop Color="White" Offset="1"/>
      </LinearGradientBrush>
    </Grid.Background>
    <Grid x:Name="MyCon10uumRoot">
      <!--Backgroud-->
      <Image Source="imagefond1.png" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="70,0,0,0" Height="756" ></Image>
      <Image Source="imagefond2.png" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-80,0" Height="857"></Image>

      <Canvas x:Name="DrawCanvas" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" ></Canvas>
      <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right" Height="29" FontFamily="Vijaya" FontSize="18" FontWeight="Bold" Foreground="#FFB10F0F" TextDecorations="Underline" TextWrapping="Wrap">
        <Run Text="Credits : Maxence Dislaire/GoTactile, R. Clayton Miller 10/GUI original designer, Idées-3Com (créa), Dominiques Dillies (sample photos), Fabien Denis (model), ventealappart.fr (shirt)"/>
      </TextBlock>
      <c:Con10uum WindowMinWidth="800" x:Name="MyCon10uum" OpenCloseAnimationDuration="0:0:0.5" Resistance="0.02" MaxScrollVelocity="15" ItemHeaderTemplate="{DynamicResource HeaderTemplate}" ItemContentTemplate="{DynamicResource ContentTemplate}">
        <!--<c:Con10uumWindow Header="Torrent">
          <local:ShowroomTorrent/>
        </c:Con10uumWindow>

        <c:Con10uumWindow Header="Photos">
          <local:ShowRoom1/>
        </c:Con10uumWindow>
        <c:Con10uumWindow Header="Manipulation">
          <s1:MainWindow/>
        </c:Con10uumWindow>-->
        
        <!--<c:Con10uumWindow Header="DeepZoom">
          <local:ShowRoomDeepzoom/>
        </c:Con10uumWindow>
        <c:Con10uumWindow Header="Drawing">
          <s2:MainWindow Width="400"/>
        </c:Con10uumWindow>-->
        
      </c:Con10uum>
    </Grid>
    <!--Tiroir-->
    <local:Tiroir HorizontalAlignment="Right" Width="600" VerticalAlignment="Stretch" Margin="0,0,0,0" x:Name="TiroirTest" >
      <i:Interaction.Behaviors>
        <local:GlassBehavior Visual="{Binding ElementName=MyCon10uumRoot, Mode=OneWay}">
          <local:GlassBehavior.Effect>
            <BlurEffect  Radius="40"/>
          </local:GlassBehavior.Effect>
        </local:GlassBehavior>
      </i:Interaction.Behaviors>
    </local:Tiroir>
  </Grid>
</Window>
